package com.hps.activemq.controller;


import com.hps.activemq.entity.Order;
import com.hps.activemq.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author admin
 * @since 2019-01-11
 */
@RestController
@RequestMapping("/orders")
public class OrderController {

    private OrderService orderService;

    public OrderController(OrderService orderService) {
        this.orderService = orderService;
    }

    @GetMapping("/check-success/{userId}/{goodId}")
    public Map<String, Object> checkSuccess(@PathVariable Long userId, @PathVariable Long goodId) {
        return orderService.checkSuccess(userId, goodId);
    }
}

